<template>
	<view class="position-details">
		<swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000">
			<swiper-item>
				<view class="swiper-item">
					<image src="../../static/背景.jpg" mode=""></image>
				</view>
			</swiper-item>
			<swiper-item>
				<view class="swiper-item">
					<image src="../../static/背景.jpg" mode=""></image>
				</view>
			</swiper-item>
		</swiper>
		<view class="header">
			<view class="title">
				500强华硕电脑招普工管吃住
			</view>
			<view class="salary">
				4000-4000/月
			</view>
			<view>
				<view class="label">
					美女多 福利好 环境好
				</view>
			</view>
		</view>
		<view class="anchor">
			<view class="link">工资福利</view>
			<view class="link">岗位说明</view>
			<view class="link">企业介绍</view>
		</view>
		<view class="my-salary">
			<view class="money">我能挣多少钱</view>
			<view class="time">01-17</view>
		</view>
		<view style="background: #FFFFFF;padding: 0 20rpx;margin-bottom: 20rpx;">
			<my-table :messages="messages"></my-table>
		</view>

		<view class="my-salary">
			<view class="money">我能享受的福利待遇</view>
		</view>
		<view style="background: #FFFFFF;padding: 0 20rpx;margin-bottom: 20rpx;">
			<my-table :messages="treatment"></my-table>
		</view>
		<view class="my-salary">
			<view class="money">我要做什么</view>
		</view>
		<view style="background: #FFFFFF;padding: 0 20rpx;margin-bottom: 20rpx;">
			<my-table :messages="treatment"></my-table>
		</view>
		<view class="enterprise" style="background: #FFFFFF;">
			<view class="my-salary">
				<view class="money">企业简介</view>
			</view>
			<view class="content" style="padding: 10rpx 20rpx 30rpx 20rpx;">测试</view>
		</view>
		<view class="tag">
			<image src="../../static/logo.png"></image>
			<view class="evaluate">
				<view class="title">
					名硕电脑
				</view>
				<van-rate style="width: 120rpx;" v-model="score" :size="18" gutter="gutter" color="#f5b000" readonly></van-rate>
			</view>
			<image class="right" src="../../static/右箭头.png"></image>
		</view>
		<view class="address">
			<image src="../../static/address.jpg" ></image>
			<view class="addr">江苏省测试测试测试测试测试测试测试测试</view>
			<view class="btn">导航</view>
		</view>
	</view>
</template>

<script>
	import myTable from '../../components/mytable.vue'
	export default {
		data() {
			return {
				score: 5,
				gutter: "0rpx",
				messages: [{
						header: "综合薪资",
						td: "400",
						direction: ""
					},
					{
						header: "发薪日",
						td: "每月10号",
						direction: ""
					},
					{
						header: "薪资结构",
						td: "啊这",
						direction: "left"
					}
				],
				treatment: [{
						header: "伙食情况",
						td: "每月餐补",
						direction: ""
					},
					{
						header: "住宿情况",
						td: "6-8人每间",
						direction: ""
					},
					{
						header: "社保情况",
						td: "刷卡吃饭",
						direction: ""
					},
					{
						header: "其他福利",
						td: "测试测试",
						direction: "left"
					}
				],
				work: [{
						header: "工作类容",
						td: "测试测试",
						direction: "left"
					},
					{
						header: "工作时间",
						td: "测试测试",
						direction: "left"
					},
					{
						header: "工作方式",
						td: "测试测试",
						direction: ""
					}
				]
			}
		},

		components: {
			'myTable': myTable
		},
		methods: {
			rowClassNameFn(row, index) {
				if (index === 1) {
					return 'demo-table-info-row';
				} else if (index === 3) {
					return 'demo-table-error-row';
				}
				return "";
			}

		}
	}
</script>

<style lang="scss" scoped>
	.position-details {
		background: #DCDFE6;

		.swiper-item {
			image {
				width: 100vw;
			}
		}

		.header {
			background: #FFFFFF;
			font-size: 34rpx;
			line-height: 60rpx;
			display: flex;
			flex-direction: column;
			padding: 20rpx 40rpx;
			margin-bottom: 20rpx;

			.title {}

			.salary {
				color: #ff0000;
			}

			.label {
				display: inline;
				background: #E5E5E5;
				color: #007AFF;
				padding: 0 2rpx;
			}
		}

		.anchor {
			display: flex;
			justify-content: space-around;
			background: #FFFFFF;
			padding: 20rpx;
			font-size: 34rpx;
			margin-bottom: 10rpx;
		}

		.my-salary {
			display: flex;
			justify-content: space-between;
			background: #FFFFFF;
			padding: 10rpx;
			font-size: 32rpx;

			.money {
				padding: 10rpx;
				border-left: solid 10rpx #409EFF;
			}
		}

		.tag {
			display: flex;
			padding: 20rpx 30rpx;
			position: relative;
			image{
				width: 120rpx;
				height: 120rpx;
				margin-right: 80rpx;
			}
			.evaluate{
				.title{
					margin-bottom: 30rpx;
					overflow: hidden;
					text-overflow: ellipsis;
					white-space: nowrap;
				}
			}
			.right{
				width: 50rpx;
				height: 50rpx;
				position: absolute;
				bottom: 20rpx;
				right: -20rpx;
			}
		}
		.address{
			image{
				width: 50rpx;
				height: 50rpx;
			}
			.addr{
				overflow: hidden;
				text-overflow: ellipsis;
				white-space: nowrap;
			}
			.btn{
				border-radius: 999rpx;
				border: solid 1px #F0AD4E;
			}
		}
	}
</style>
